<?php
class Contracts extends CActiveRecord
{
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	public function relations()
	{
		return array(
					'bills'=>array(self::HAS_MANY,'Bills','id_contract',
												  'order'=>'bills.id_bills_type ASC'
									  ),
					'tariffPlan'=>array(self::BELONGS_TO,'TariffPlan','plan_shop'),
					'paidService'=>array(self::HAS_MANY, 
					'PaidService', 
					'id_contract',
					'order'=>'paidService.id_bills_type ASC'),
					);
	}
	

	//public 
}
?>